package com.ruoyi.web.controller.api.dict;

import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.service.ISysDictDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: wk
 * @Date: 2022/8/17 9:05
 * @Version: 1.0
 */
@Api(tags = {"前端-数据字典"})
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/dict")
public class DictApiController {
    private final ISysDictDataService dictDataService;

    @ApiOperation("通用-查询字典列表")
    @GetMapping("/list")
    public TableDataInfo<SysDictData> list(SysDictData dictData, PageQuery pageQuery) {
        pageQuery.setPageSize(100);
        return dictDataService.selectPageDictDataList(dictData, pageQuery);
    }
}
